<template>
  <pt-grid-sel :beforeQuery="beforeQuery" :disabled="disabled" :idVal="idVal"
               :ptQuery="ptQuery" :txtVal="txtVal" @rowClick="doClick"
               height="50vh" placeholder="请选择" url="/login/auth/AuthUser/find">
    <pt-table-column align="left" header-align="center" label="账号" prop="account" sortable
                     width="100px"></pt-table-column>
    <pt-table-column align="left" header-align="center" label="姓名" prop="name" sortable width="150px"></pt-table-column>
  </pt-grid-sel>
</template>

<script>

  export default {
    name: 'usertabledrop',
    components: {},
    data() {
      return {
        ptQuery: this.$query()
      }
    },
    mounted() {

    },
    props: {idVal: String, txtVal: String, disabled: Boolean},// 设置value为props属性-必须
    methods: {
      beforeQuery(val) {
        this.ptQuery.query.anyQuery = val
      },
      doClick(row) {
        this.$emit('update:txtVal', row.account)
        this.$emit('update:idVal', row.userId)
      }
    }
  }
</script>
